<?php
include "database_connection.php";
class LoginModel {
	private $db;
	
	function __construct() {
		$this->db = DatabaseConn::getInstance(); 
	}
	
	public function check_user($myusername, $mypassword) { 
		$myusername = stripslashes($myusername);
		$mypassword = stripslashes($mypassword);
		$myusername = mysql_real_escape_string($myusername);
		$mypassword = mysql_real_escape_string($mypassword);
		$query = "SELECT * FROM login WHERE username='$myusername' and password='$mypassword'";
		$result = mysql_query($query);
		if(mysql_num_rows($result)) {
			return "true";
		}
		
		return "false";
	}
}
?>